import request from '@/config/axios'
import type { UserKeyWordType, CreateBindItem } from './types'

export const queryUserListApi = (params: UserKeyWordType): Promise<IResponse> => {
  return request.get({ url: '/v1/admin/user/retrieve/', params })
}

export const queryCustListApi = (kw: string): Promise<IResponse> => {
  return request.get({ url: '/v1/admin/exdoctor/custList/', params: { kw } })
}

export const queryBindInfoApi = (uid: number): Promise<IResponse> => {
  return request.get({ url: '/v1/admin/exdoctor/bindAccount/', params: { uid } })
}

export const createBindInfoApi = (data: CreateBindItem): Promise<IResponse> => {
  return request.post({ url: '/v1/admin/exdoctor/bindAccount/', data })
}
